<?php
$book_id = $_GET['bookid'];
session_start();
if(!isset($_SESSION['username'])){
    // echo '<script>alert("未登录");location="./login.html"</script>';
    exit(0);
}

include('./connect.php');
if ($conn->connect_error) {
    // echo '数据库连接失败！';
    exit(0);
} else {
    $sql_delete = "delete from book where book_id = '$book_id'";
    $res_delete = $conn->query($sql_delete);
    if ($res_delete) {
    } else {
        // echo "<script>alert('系统繁忙，请稍候！');</script>";
    }
}
?>